// 全局样式重置和基础设置
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #303133;
  background-color: #f5f7fa;
  overflow-x: hidden;
}

// 全局容器样式
.page-container {
  padding: 20px;
  min-height: calc(100vh - 120px);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.page-header {
  margin-bottom: 24px;
  padding: 20px 0;
  border-bottom: 2px solid #e4e7ed;
  
  h1 {
    font-size: 28px;
    font-weight: 600;
    color: #303133;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
  
  .page-description {
    margin-top: 8px;
    color: #606266;
    font-size: 16px;
  }
}

// 卡片样式增强
.enhanced-card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e4e7ed;
  background: #ffffff;
  transition: all 0.3s ease;
  overflow: hidden;
  
  &:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
  }
  
  .el-card__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-bottom: none;
    
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      
      span {
        font-size: 16px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
      }
    }
  }
  
  .el-card__body {
    padding: 24px;
  }
}

// 表格样式增强
.enhanced-table {
  .el-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    
    th {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      color: #495057;
      font-weight: 600;
      font-size: 14px;
      padding: 16px 12px;
      border-bottom: 2px solid #dee2e6;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      min-width: 120px; // 确保最小宽度
    }
    
    td {
      padding: 14px 12px;
      border-bottom: 1px solid #f1f3f4;
      font-size: 13px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      max-width: 200px; // 限制最大宽度
      
      &:hover {
        background-color: #f8f9fa;
      }
    }
    
    .el-table__row {
      transition: background-color 0.2s ease;
      
      &:hover {
        background-color: #f8f9fa;
      }
    }
  }
}

// 按钮样式增强
.enhanced-button {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  &.el-button--primary {
    background: linear-gradient(135deg, #409eff 0%, #3a8ee6 100%);
    border: none;
  }
  
  &.el-button--success {
    background: linear-gradient(135deg, #67c23a 0%, #5daf34 100%);
    border: none;
  }
  
  &.el-button--warning {
    background: linear-gradient(135deg, #e6a23c 0%, #cf9236 100%);
    border: none;
  }
  
  &.el-button--danger {
    background: linear-gradient(135deg, #f56c6c 0%, #f04747 100%);
    border: none;
  }
}

// 表单样式增强
.enhanced-form {
  .el-form-item {
    margin-bottom: 20px;
    
    .el-form-item__label {
      font-weight: 500;
      color: #606266;
      font-size: 14px;
      min-width: 120px; // 确保标签宽度
      text-align: right;
      padding-right: 12px;
    }
    
    .el-input, .el-select, .el-textarea {
      .el-input__inner, .el-select__input, .el-textarea__inner {
        border-radius: 6px;
        border: 1px solid #dcdfe6;
        transition: all 0.3s ease;
        
        &:focus {
          border-color: #409eff;
          box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
        }
      }
    }
  }
}

// 统计卡片样式
.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  
  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  }
  
  .stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

// 响应式设计
@media (max-width: 1200px) {
  .page-container {
    padding: 16px;
  }
  
  .enhanced-table .el-table th,
  .enhanced-table .el-table td {
    padding: 12px 8px;
    font-size: 12px;
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 12px;
  }
  
  .page-header h1 {
    font-size: 24px;
  }
  
  .enhanced-card .el-card__body {
    padding: 16px;
  }
  
  .stat-card {
    padding: 16px;
    
    .stat-number {
      font-size: 28px;
    }
    
    .stat-label {
      font-size: 12px;
    }
  }
}

// 动画效果
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

// 滚动条美化
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  
  &:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  }
}